def add(num1, num2):
    result = num1+num2
    print(f"{num1}+{num2}={result}")

def sub(num1, num2):
    result = num1-num2
    print(f"{num1}-{num2}={result}")

def mul(num1, num2):
    result = num1*num2
    print(f"{num1}*{num2}={result}")

def div(num1, num2):
    result = num1/num2
    print(f"{num1}/{num2}={result}")

op = input("选择计算功能（+，-，*，/）：")
num1 = float(input("输入num1："))
num2 = float(input("输入num2："))

switcher = {"+": lambda: add(num1, num2),
            "-": lambda: sub(num1, num2),
            "*": lambda: mul(num1, num2),
            "/": lambda: div(num1, num2)}

func = switcher.get(op, None)

if func:
    func()
else:
    print("请选择正确的计算！")